这一节课的单看视频的话代码不完整

来源:6-5 用Grid和Flexbox布局优化项目列表页面

慕粉9043713

2021-03-26

最后我改出了老师展示的效果,不知道对不对。
authenticated-app.tsx

import styled from '@emotion/styled’
import React from 'react’
import { useAuth } from './context/auth-context’
import { ProjectListScreen } from ‘./screens/project-list’

export const AuthenticatedApp = () => {
const { logout } = useAuth()
return



Logo


项目


用户




<button onClick={() => logout()}>登出






}

const Container = styled.divdisplay: grid; grid-template-rows: 6rem 1fr 6rem; grid-template-areas: "header" "main"; height: 100vh;

const Header = styled.headergrid-area: header; display: flex; flex-direction: row; align-items: center; justify-content: space-between;

const HeaderLeft = styled.divdisplay: flex; align-items: center;

const HeaderRight = styled.div``

const Main = styled.maingrid-area: main;

写回答

2回答

夏目鲸鱼

2022-04-12

对,视频少了一行代码

grid-template-areas: "header" "main";


2
1
温绪
卧槽我就说呢,我找了好久。。。
2022-05-31
共1条回复

Nolan

2021-04-08

你好,对比源代码看一下吧 https://github.com/sindu12jun/imooc-jira

0
0

React17+Hook+TS4 优质实践,仿 Jira 企业级项目

解锁 React17 高阶用法,轻松应对大型复杂长周期项目

2691 学习 · 1236 问题

查看课程