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 Head from "next/head"; | |
import Link from "next/link"; | |
import { Container, Nav, NavItem } from "reactstrap"; | |
class Layout extends React.Component { | |
constructor(props) { | |
super(props); | |
} |
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
/* _app.js */ | |
import React from "react"; | |
import App, { Container } from "next/app"; | |
import Head from "next/head"; | |
export default class MyApp extends App { | |
static async getInitialProps({ Component, router, ctx }) { | |
let pageProps = {}; |
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
/* /components/Layout.js */ | |
import React from "react"; | |
import Head from "next/head"; | |
import Link from "next/link"; | |
import { Container, Nav, NavItem } from "reactstrap"; | |
class Layout extends React.Component { | |
constructor(props) { |
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
/* /pages/index.js */ | |
import { Button, Alert } from "reactstrap"; | |
import Layout from "../components/Layout"; | |
export default () => { | |
return ( | |
<Layout> | |
<div> | |
<Alert color="primary"> | |
Hello Project is strapi-next with Bootstrap | |
</Alert> |
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
/* pages/index.js */ | |
import { Button, Alert } from "reactstrap"; | |
export default () => { | |
return ( | |
<div> | |
<div> | |
<Alert color="primary"> | |
Hello Project is strapi-next with Bootstrap | |
</Alert> |
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
/* pages/register.js */ | |
export default () => { | |
return <h1>Sign Up</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
/* pages/login.js */ | |
export default () => { | |
return <h1>Sign In</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
/* components/RestaurantList/index.js */ | |
import gql from "graphql-tag"; | |
import Link from "next/link"; | |
import { graphql } from "react-apollo"; | |
import { | |
Button, | |
Card, | |
CardBody, | |
CardColumns, | |
CardImg, |
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
/* /lib/apollo.js */ | |
import { HttpLink } from "apollo-link-http"; | |
import { withData } from "next-apollo"; | |
const API_URL = process.env.NEXT_PUBLIC_API_URL || "http://localhost:1337" | |
const config = { | |
link: new HttpLink({ | |
uri: `${API_URL}/graphql`, // Server URL (must be absolute) |
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 Link from "next/link"; | |
<div className="card-footer"> | |
<Link | |
as={`/restaurants/${res._id}`} | |
href={`/restaurants?id=${res._id}`} | |
> | |
<a className="btn btn-primary">View</a> | |
</Link> | |
</div> |
OlderNewer