mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed boris caption
This commit is contained in:
parent
dac27ca9d8
commit
32a2a0567e
5 changed files with 17 additions and 3 deletions
|
@ -17,7 +17,12 @@ const ProfileDescriptionUnconnected: FC<IProps> = ({ profile: { user, is_loading
|
|||
|
||||
return (
|
||||
<div className={styles.wrap}>
|
||||
{user.description && <div className={styles.content}>{formatText(user.description)}</div>}
|
||||
{user.description && (
|
||||
<div
|
||||
className={styles.content}
|
||||
dangerouslySetInnerHTML={{ __html: formatText(user.description) }}
|
||||
/>
|
||||
)}
|
||||
{!user.description && (
|
||||
<div className={styles.placeholder}>
|
||||
{user.fullname || user.username} пока ничего не рассказал о себе
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
.content {
|
||||
padding: $gap * 2;
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
|
|
|
@ -116,8 +116,9 @@
|
|||
line-height: 0.95em;
|
||||
flex-direction: column;
|
||||
padding-bottom: $gap * 2;
|
||||
padding: 0 10% $gap * 2;
|
||||
padding: 0 0 $gap * 2;
|
||||
transform: translate(-50%, 0);
|
||||
box-sizing: border-box;
|
||||
|
||||
@include tablet {
|
||||
align-items: flex-start;
|
||||
|
|
|
@ -84,7 +84,7 @@ function* refreshUser() {
|
|||
function* checkUserSaga({ key }: RehydrateAction) {
|
||||
if (key !== 'auth') return;
|
||||
yield call(refreshUser);
|
||||
yield put(authOpenProfile('gvorcek'));
|
||||
// yield put(authOpenProfile('gvorcek'));
|
||||
}
|
||||
|
||||
function* gotPostMessageSaga({ token }: ReturnType<typeof gotAuthPostMessage>) {
|
||||
|
|
|
@ -47,7 +47,11 @@ export const sagaMiddleware = createSagaMiddleware();
|
|||
export const history = createBrowserHistory();
|
||||
|
||||
history.listen(({ pathname }) => {
|
||||
console.log({ pathname });
|
||||
|
||||
if (pathname.match(/~([\wа-яА-Я]+)/)) {
|
||||
console.log('hi!', pathname.match(/~([\wа-яА-Я]+)/));
|
||||
|
||||
const [, username] = pathname.match(/~([\wа-яА-Я]+)/);
|
||||
window.postMessage({ type: 'username', username }, '*');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue