From f3ace466df358429137a79ac374096254b677517 Mon Sep 17 00:00:00 2001 From: Gizmotronn Date: Tue, 22 Mar 2022 16:03:02 +0800 Subject: [PATCH] Removing #3, as we're replacing it. Also adding some stuff for acord-robotics/stellarios --- content/private/private-note.md | 4 ++- quartz-cli/src/events/EventComponent.tsx | 11 -------- quartz-cli/src/index.tsx | 14 ----------- quartz-cli/src/props/Child.tsx | 20 --------------- quartz-cli/src/props/Parent.tsx | 9 ------- quartz-cli/src/react-app-env.d.ts | 1 - quartz-cli/src/state/List.tsx | 25 ------------------ quartz-cli/src/state/UserSearch.tsx | 32 ------------------------ 8 files changed, 3 insertions(+), 113 deletions(-) delete mode 100644 quartz-cli/src/events/EventComponent.tsx delete mode 100644 quartz-cli/src/index.tsx delete mode 100644 quartz-cli/src/props/Child.tsx delete mode 100644 quartz-cli/src/props/Parent.tsx delete mode 100644 quartz-cli/src/react-app-env.d.ts delete mode 100644 quartz-cli/src/state/List.tsx delete mode 100644 quartz-cli/src/state/UserSearch.tsx diff --git a/content/private/private-note.md b/content/private/private-note.md index 6930c102cc1a1..875c8b7012d88 100644 --- a/content/private/private-note.md +++ b/content/private/private-note.md @@ -2,4 +2,6 @@ title: "Private Stuff" --- -This page doesn't get published! \ No newline at end of file +This page doesn't get published! + +Original AoD Portal: https://drive.google.com/drive/folders/1Mm1gNJJnw_60izyuI7XfinMPy2zC24Vs?usp=sharing \ No newline at end of file diff --git a/quartz-cli/src/events/EventComponent.tsx b/quartz-cli/src/events/EventComponent.tsx deleted file mode 100644 index 904997cc47861..0000000000000 --- a/quartz-cli/src/events/EventComponent.tsx +++ /dev/null @@ -1,11 +0,0 @@ -const EventComponent: React.FC = () => { - const onChange = (e) => { - console.log(e); - } - - return
- -
-}; - -export default EventComponent; \ No newline at end of file diff --git a/quartz-cli/src/index.tsx b/quartz-cli/src/index.tsx deleted file mode 100644 index 5e63651bfb529..0000000000000 --- a/quartz-cli/src/index.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import ReactDOM from 'react-dom'; -//import UserSearch from './state/UserSearch' -//import List from './state/List' -import EventComponent from './events/EventComponent'; - -const App = () => { - return ( -
- -
- ); -}; - -ReactDOM.render(, document.getElementById('root')); \ No newline at end of file diff --git a/quartz-cli/src/props/Child.tsx b/quartz-cli/src/props/Child.tsx deleted file mode 100644 index a44d08c1f7b5e..0000000000000 --- a/quartz-cli/src/props/Child.tsx +++ /dev/null @@ -1,20 +0,0 @@ -interface ChildProps { - colour: string; - onClick: () => void; -} - -export const Child = ({ colour, onClick }: ChildProps) => { - return
- {colour} - -
-}; - -export const ChildAsReactFC: React.FC = ({ colour, onClick, children }) => { - return
- {colour} - -
-}; - -//ChildAsReactFC.displayName = 'ChildAsReactFC'; \ No newline at end of file diff --git a/quartz-cli/src/props/Parent.tsx b/quartz-cli/src/props/Parent.tsx deleted file mode 100644 index 86377c833969b..0000000000000 --- a/quartz-cli/src/props/Parent.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { ChildAsReactFC } from './Child'; - -const Parent = () => { - return console.log('Clicked')}>; - Nothing - -}; - -export default Parent; \ No newline at end of file diff --git a/quartz-cli/src/react-app-env.d.ts b/quartz-cli/src/react-app-env.d.ts deleted file mode 100644 index 6431bc5fc6b2c..0000000000000 --- a/quartz-cli/src/react-app-env.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/quartz-cli/src/state/List.tsx b/quartz-cli/src/state/List.tsx deleted file mode 100644 index 61c64d7d269cd..0000000000000 --- a/quartz-cli/src/state/List.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { useState } from 'react'; - -const List: React.FC = () => { - const [name, setName] = useState(''); - const [users, setUsers] = useState([]); - - const onClick = () => { - setName(''); - setUsers([...users, name]); // Take current users array and add current name to the end - - } - - return ( -
-

List

-
    - {users.map(user =>
  • {user}
  • )} -
- setName(e.target.value)} /> - -
- ); -}; - -export default List; \ No newline at end of file diff --git a/quartz-cli/src/state/UserSearch.tsx b/quartz-cli/src/state/UserSearch.tsx deleted file mode 100644 index e6cd563322816..0000000000000 --- a/quartz-cli/src/state/UserSearch.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { useState } from 'react'; - -const users = [ - { name: 'Hello', age: 20 }, - { name: 'There', age: 20 }, - { name: 'World', age: 20 }, -]; - -const UserSearch: React.FC = () => { - const [name, setName] = useState(''); - const [user, setUser] = useState<{ name: string, age: number } | undefined>(); // Two types of values/results from a search - - const onClick = () => { - const foundUser = users.find((user) => { - return user.name === name; // Connect the result of the search to the `foundUser` variable - }); - - setUser(foundUser); - }; - - return
- User Search - setName(e.target.value)} /> - -
- {user && user.name} - {user && user.age} -
-
; -} - -export default UserSearch; \ No newline at end of file