|
Last change
on this file since cb0881d was cb0881d, checked in by MBK <marija.karapandzova@…>, 4 months ago |
|
Set up React frontend and add design styles
|
-
Property mode
set to
100644
|
|
File size:
298 bytes
|
| Line | |
|---|
| 1 |
|
|---|
| 2 | import './App.css';
|
|---|
| 3 | import React, { useEffect, useState } from 'react';
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | function App() {
|
|---|
| 7 | const [user, setUser] = useState(null);
|
|---|
| 8 |
|
|---|
| 9 | useEffect(() => {
|
|---|
| 10 | const userStr = localStorage.getItem('user');
|
|---|
| 11 | if (userStr) {
|
|---|
| 12 | setUser(JSON.parse(userStr));
|
|---|
| 13 | }
|
|---|
| 14 | }, []);
|
|---|
| 15 | }
|
|---|
| 16 | export default App;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.