This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AddCar, NavBar, NewCars } from "./ui-components"; | |
| import { Divider, withAuthenticator } from "@aws-amplify/ui-react"; | |
| import { DataStore } from "@aws-amplify/datastore"; | |
| import { Car } from "./models"; | |
| import { useState } from "react"; | |
| import "./App.css"; | |
| // retrieving signOut function, and user data | |
| function App({ user, signOut }) { | |
| const [name, setName] = useState(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { DataStore } from "@aws-amplify/datastore"; | |
| import { Car } from "./models"; | |
| ... | |
| const saveCar = async () => { | |
| try { | |
| await DataStore.save( | |
| new Car({ | |
| name: name, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const [name, setName] = useState(""); | |
| const [price, setPrice] = useState(""); | |
| const [description, setDescription] = useState(""); | |
| const [imageUrl, setImageUrl] = useState(""); | |
| const addCarOverrides = { | |
| "Flex.Flex[0].Flex[1].TextField[0]": { | |
| onChange: (event) => { | |
| setName(event.target.value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AddCar, NavBar, NewCars } from "./ui-components"; | |
| import { Divider, withAuthenticator } from "@aws-amplify/ui-react"; | |
| import "./App.css"; | |
| // retrieving signOut function, and user data | |
| function App({ user, signOut }) { | |
| const navbarOverrides = { | |
| "Flex.Flex[0].Image[0]": { | |
| src: "https://img.icons8.com/color/50/000000/car--v1.png", // app logo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NavBar, NewCars } from "./ui-components"; | |
| import { withAuthenticator } from "@aws-amplify/ui-react"; | |
| import "./App.css"; | |
| // retrieving signOut function, and user data | |
| function App({ user, signOut }) { | |
| const navbarOverrides = { | |
| "Flex.Flex[0].Image[0]": { | |
| src: "https://img.icons8.com/color/50/000000/car--v1.png", // app logo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NavBar, NewCars } from "./ui-components"; | |
| import {withAuthenticator } from '@aws-amplify/ui-react'; | |
| import "./App.css"; | |
| function App() { | |
| const navbarOverrides = { | |
| "Flex.Flex[0].Image[0]": { | |
| src: "https://img.icons8.com/color/50/000000/car--v1.png", // app logo | |
| }, | |
| "Flex.Flex[2].Image[0]": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NavBar, NewCars } from "./ui-components"; | |
| import "./App.css"; | |
| function App() { | |
| const navbarOverrides = { | |
| "Flex.Flex[0].Image[0]": { | |
| src: "https://img.icons8.com/color/50/000000/car--v1.png", // app logo | |
| }, | |
| "Flex.Flex[2].Image[0]": { | |
| src: "https://www.bootdey.com/app/webroot/img/Content/avatar/avatar1.png", // profile image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NavBar } from "./ui-components"; | |
| import "./App.css"; | |
| function App() { | |
| const navbarOverrides = { | |
| "Flex.Flex[0].Image[0]": { | |
| src: "https://img.icons8.com/color/50/000000/car--v1.png", // app logo | |
| }, | |
| "Flex.Flex[2].Image[0]": { | |
| src: "https://www.bootdey.com/app/webroot/img/Content/avatar/avatar1.png", // profile image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logo from './logo.svg'; | |
| import './App.css'; | |
| import {NavBar} from "./ui-components"; | |
| function App() { | |
| return ( | |
| <div className="App"> | |
| <NavBar/> | |
| <header className="App-header"> | |
| <h1>Car Rental App</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import './index.css'; | |
| import App from './App'; | |
| import Amplify from 'aws-amplify'; | |
| import "@aws-amplify/ui-react/styles.css"; | |
| import {AmplifyProvider} from "@aws-amplify/ui-react"; | |
| import awsConfig from './aws-exports'; | |
| Amplify.configure(awsConfig); |