Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Page and Component separation #85

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import {HashRouter, Route, Routes} from "react-router-dom";
import Code from "./components/Code.jsx";
import Home from "./components/Home.jsx";
import Downloads from "./components/Downloads.jsx";
import Code from "./components/code/Code.jsx";
import Home from "./components/home/Home.jsx";
import Downloads from "./components/downloads/Downloads.jsx";
import "../dist/output.css";

const HOME_PATH = "/";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Code.jsx → src/components/code/Code.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useEffect, useState} from "react";
import RegistryView from "./RegistryView.jsx";
import {loadWasm} from "../rust_functions.js";
import {loadWasm} from "../../rust_functions.js";

import MemoryView from "./MemoryView.jsx";
import Console from "./Console.jsx";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useCallback, useEffect, useReducer, useRef, useState} from "react";
import {listen} from "@tauri-apps/api/event";
import {CALLBACKS_TRIGGERS, CALLBACK_TYPES} from "./simulator.js";
import {RUST} from "../rust_functions.js";
import {RUST} from "../../rust_functions.js";

const ENTER = 13;

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useCallback, useEffect, useRef, useState} from "react";
import {RUST} from "../rust_functions.js";
import {RUST} from "../../rust_functions.js";
import {CALLBACK_TYPES, CALLBACKS_TRIGGERS} from "./simulator.js";

const WIDTH = 4;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useState} from "react";
import {RUST} from "../rust_functions.js";
import {RUST} from "../../rust_functions.js";
import {CALLBACK_TYPES, CALLBACKS_TRIGGERS} from "./simulator.js";

function RegistryView({loaded, registerCallback}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {useCallback, useReducer, useRef, useState} from "react";
import {RUST} from "../rust_functions.js";
import {RUST} from "../../rust_functions.js";

const STATE = {
IDLE: 1,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/Home.jsx → src/components/home/Home.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import {useNavigate} from "react-router-dom";
import {CODE_PATH} from "../App.jsx";
import {CODE_PATH} from "../../App.jsx";

function Home() {

Expand Down
2 changes: 1 addition & 1 deletion src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import ReactDOM from "react-dom/client";
import "../dist/output.css";
import App from "./App.jsx";
import "../dist/output.css";

ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ["./src/components/*.jsx",
content: ["./src/components/*/*.jsx",
"./src/App.jsx"],
theme: {
extend: {},
Expand Down