Compare commits

..

1 Commits

2 changed files with 51 additions and 3 deletions
+51
View File
@@ -0,0 +1,51 @@
import React, { useEffect, useState } from "react";
import { Button } from '@SharePoint/rencredit_uikit';
export default function Header(){
const[appName, setAppName] = useState<string>('');
useEffect( () => {
setAppName(document.getElementById('page__header-block')?.dataset.app_name || '');
}, [])
return (
<div className="header-block__header-container">
<div className="header-container__block">
<div>
<Button
type = 'button'
onClick = {() => document.location.href='/public/menu'}
text = 'ЛОГОТИП ТУТ'
ui = 'secondaryPurple'
/>
</div>
<div>
<Button
type = 'button'
onClick = {() => document.location.href='/public/menu'}
text = 'Меню'
ui = 'secondaryPurple'
/>
</div>
<div className="header-container__block__app-name">{appName}</div>
</div>
<div className="header-container__block">
<div>
<Button
type = 'button'
onClick = {() => document.location.href='/public/request_access'}
text = 'Заказать доступ'
ui = 'secondaryPurple'
/>
</div>
<div>
<Button
type = 'button'
onClick = {() => document.location.href='/public/logout'}
text = 'Выход'
ui = 'secondaryPurple'
/>
</div>
</div>
</div>
)
}
-3
View File
@@ -5,6 +5,3 @@ use Illuminate\Support\Facades\Route;
Route::get('/', function () { Route::get('/', function () {
return view('welcome'); return view('welcome');
}); });
Route::get('/menu', function () {
return view('menu_start');
})->name('magic_menu');