directory structure, some basics for front end
This commit is contained in:
@@ -1,30 +1,26 @@
|
||||
import { useState } from 'react';
|
||||
import './App.scss'
|
||||
import { Page, Panel } from './components/ui';
|
||||
import './sass/App.scss'
|
||||
|
||||
function App() {
|
||||
const [value, setValue] = useState("Waiting for stuff...");
|
||||
|
||||
const getThings = async () => {
|
||||
const data = await fetch('http://localhost:8080/hello');
|
||||
const json = await data.json();
|
||||
setValue(json.message);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<h1>RECIPE MANAGER</h1>
|
||||
<h2>Simple Recipe Management and Sharing for the Home</h2>
|
||||
<p>Keep all your most-used recipes handy in your own personal collection.</p>
|
||||
<Page extraStyles='App'>
|
||||
<Panel>
|
||||
<h1>RECIPE MANAGER</h1>
|
||||
<h2>Simple Recipe Management and Sharing for the Home</h2>
|
||||
<p>Keep all your most-used recipes handy in your own personal collection.</p>
|
||||
</Panel>
|
||||
|
||||
<h2>Share Your Recipe Collection</h2>
|
||||
<p>Share your personal collection with your friends and family, and subscribe to their collections.</p>
|
||||
<Panel>
|
||||
<h2>Share Your Recipe Collection</h2>
|
||||
<p>Share your personal collection with your friends and family, and subscribe to their collections.</p>
|
||||
</Panel>
|
||||
|
||||
<h2>Build Shopping Lists Directly from Your Recipes</h2>
|
||||
<p>Lay out your meal plan for the week, and let Recipin automatically generate your grocery list, ingredient by ingredient.</p>
|
||||
|
||||
<p>{value}</p>
|
||||
<button onClick={getThings}>Do some stuff!</button>
|
||||
</div>
|
||||
<Panel>
|
||||
<h2>Build Shopping Lists Directly from Your Recipes</h2>
|
||||
<p>Lay out your meal plan for the week, and let Recipin automatically generate your grocery list, ingredient by ingredient.</p>
|
||||
</Panel>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
0
client/src/components/pages/AddRecipe.tsx
Normal file
0
client/src/components/pages/AddRecipe.tsx
Normal file
0
client/src/components/pages/Collection.tsx
Normal file
0
client/src/components/pages/Collection.tsx
Normal file
0
client/src/components/pages/GroceryList.tsx
Normal file
0
client/src/components/pages/GroceryList.tsx
Normal file
0
client/src/components/pages/Login.tsx
Normal file
0
client/src/components/pages/Login.tsx
Normal file
0
client/src/components/pages/Profile.tsx
Normal file
0
client/src/components/pages/Profile.tsx
Normal file
0
client/src/components/pages/ProfileSettings.tsx
Normal file
0
client/src/components/pages/ProfileSettings.tsx
Normal file
0
client/src/components/pages/Recipe.tsx
Normal file
0
client/src/components/pages/Recipe.tsx
Normal file
0
client/src/components/pages/Register.tsx
Normal file
0
client/src/components/pages/Register.tsx
Normal file
0
client/src/components/pages/Search.tsx
Normal file
0
client/src/components/pages/Search.tsx
Normal file
0
client/src/components/pages/Welcome.tsx
Normal file
0
client/src/components/pages/Welcome.tsx
Normal file
0
client/src/components/ui/BigButton.tsx
Normal file
0
client/src/components/ui/BigButton.tsx
Normal file
0
client/src/components/ui/Button.tsx
Normal file
0
client/src/components/ui/Button.tsx
Normal file
0
client/src/components/ui/Card.tsx
Normal file
0
client/src/components/ui/Card.tsx
Normal file
0
client/src/components/ui/Checkbox.tsx
Normal file
0
client/src/components/ui/Checkbox.tsx
Normal file
0
client/src/components/ui/Divider.tsx
Normal file
0
client/src/components/ui/Divider.tsx
Normal file
0
client/src/components/ui/Dropdown.tsx
Normal file
0
client/src/components/ui/Dropdown.tsx
Normal file
0
client/src/components/ui/Navbar.tsx
Normal file
0
client/src/components/ui/Navbar.tsx
Normal file
11
client/src/components/ui/Page.tsx
Normal file
11
client/src/components/ui/Page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PageComponent } from "../../util/types"
|
||||
|
||||
const Page: PageComponent = ({ extraStyles, children }) => {
|
||||
return (
|
||||
<main className={`page ${extraStyles || null}`}>
|
||||
{ children || null }
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
export default Page;
|
||||
11
client/src/components/ui/Panel.tsx
Normal file
11
client/src/components/ui/Panel.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { PanelComponent } from "../../util/types";
|
||||
|
||||
const Panel: PanelComponent = ({ children, extraStyles }) => {
|
||||
return (
|
||||
<div className={`panel ${extraStyles || ''}`}>
|
||||
{ children || null }
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Panel;
|
||||
0
client/src/components/ui/Row.tsx
Normal file
0
client/src/components/ui/Row.tsx
Normal file
0
client/src/components/ui/TextField.tsx
Normal file
0
client/src/components/ui/TextField.tsx
Normal file
0
client/src/components/ui/Tooltip.tsx
Normal file
0
client/src/components/ui/Tooltip.tsx
Normal file
7
client/src/components/ui/index.ts
Normal file
7
client/src/components/ui/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import Page from "./Page";
|
||||
import Panel from "./Panel";
|
||||
|
||||
export {
|
||||
Page,
|
||||
Panel
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import App from './App'
|
||||
import './index.scss'
|
||||
import './sass/index.scss'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
|
||||
0
client/src/sass/helpers/_mixins.scss
Normal file
0
client/src/sass/helpers/_mixins.scss
Normal file
0
client/src/sass/helpers/_placeholders.scss
Normal file
0
client/src/sass/helpers/_placeholders.scss
Normal file
0
client/src/sass/helpers/_queries.scss
Normal file
0
client/src/sass/helpers/_queries.scss
Normal file
0
client/src/sass/helpers/_variables.scss
Normal file
0
client/src/sass/helpers/_variables.scss
Normal file
0
client/src/util/apiUtils.ts
Normal file
0
client/src/util/apiUtils.ts
Normal file
9
client/src/util/types.ts
Normal file
9
client/src/util/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { FC, ReactNode } from "react";
|
||||
|
||||
interface PortalBase {
|
||||
children?: ReactNode
|
||||
extraStyles?: string
|
||||
}
|
||||
|
||||
export type PageComponent = FC<PortalBase>
|
||||
export type PanelComponent = FC<PortalBase>
|
||||
Reference in New Issue
Block a user