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
    
  
  
    
  | func main() { | |
| websites := []string{ | |
| "https://stackoverflow.com/", | |
| "https://github.com/", | |
| "https://www.linkedin.com/", | |
| "http://medium.com/", | |
| "https://golang.org/", | |
| "https://www.udemy.com/", | |
| "https://www.coursera.org/", | 
  
    
      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
    
  
  
    
  | var wg sync.WaitGroup | |
| func main() { | |
| websites := []string{ | |
| "https://stackoverflow.com/", | |
| "https://github.com/", | |
| "https://www.linkedin.com/", | |
| "http://medium.com/", | |
| "https://golang.org/", | 
  
    
      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
    
  
  
    
  | var wg sync.WaitGroup | |
| var mut sync.Mutex | |
| func main() { | |
| websites := []string{ | |
| "https://stackoverflow.com/", | |
| "https://github.com/", | |
| "https://www.linkedin.com/", | |
| "http://medium.com/", | 
  
    
      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
    
  
  
    
  | func main() { | |
| c := make(chan string) | |
| websites := []string{ | |
| "https://stackoverflow.com/", | |
| "https://github.com/", | |
| "https://www.linkedin.com/", | |
| "http://medium.com/", | |
| "https://golang.org/", | 
  
    
      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 { Amplify } from "aws-amplify"; | |
| Amplify.configure({ | |
| Auth: { | |
| region: [your configured region], | |
| userPoolId: [your configured userPoolId], | |
| userPoolWebClientId: [your configured userPoolWebClientId] | |
| }, | |
| }); | 
  
    
      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 App = () => ( | |
| <AmplifyAuthenticator> | |
| <BrowserRouter> | |
| <Switch> | |
| //React Routes | |
| <Route path="/" component={Home} /> | |
| </Switch> | |
| </BrowserRouter> | |
| </AmplifyAuthenticator> | |
| ); | 
  
    
      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 signInFields = [ | |
| { | |
| type: "email", | |
| label: "Email", | |
| placeholder: "Please enter your Email", | |
| required: true, | |
| }, | |
| { | |
| type: "password", | |
| label: "Password", | 
  
    
      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
    
  
  
    
  | //on root CSS file (:root CSS pseudo-class matches the root element of a tree representing the document) | |
| :root { | |
| --amplify-primary-color: #1890FF; | |
| --amplify-primary-tint: #1890FF; | |
| --amplify-primary-shade: #1890FF; | |
| } | |
| // OR directly on root amplify-authenticator component | 
  
    
      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 { AmplifySignOut} from "@aws-amplify/ui-react"; | |
| import { Auth } from "aws-amplify"; | |
| <AmplifySignOut/> | |
| OR | |
| <div onClick={() => { | |
| //do something during signout | |
| Auth.signOut(); | |
| }} | 
  
    
      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
    
  
  
    
  | export const App = () => { | |
| const [authState, setAuthState] = React.useState<AuthState>(); | |
| const [user, setUser] = React.useState<object | undefined>(); | |
| useEffect(() => { | |
| return onAuthUIStateChange((nextAuthState, authData) => { | |
| setAuthState(nextAuthState); | |
| setUser(authData); | |
| }); | |
| }, []); |