pl-fe: wip valibot migration
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { statusSchema } from 'pl-api';
|
||||
import * as v from 'valibot';
|
||||
|
||||
import { Entities } from 'pl-fe/entity-store/entities';
|
||||
import { normalizeStatus } from 'pl-fe/normalizers';
|
||||
@@ -22,7 +23,7 @@ const buildStatus = (state: RootState, draftStatus: DraftStatus) => {
|
||||
const me = state.me as string;
|
||||
const account = state.entities[Entities.ACCOUNTS]?.store[me];
|
||||
|
||||
const status = statusSchema.parse({
|
||||
const status = v.parse(statusSchema, {
|
||||
id: 'draft',
|
||||
account,
|
||||
content: draftStatus.text.replace(new RegExp('\n', 'g'), '<br>'), /* eslint-disable-line no-control-regex */
|
||||
|
||||
Reference in New Issue
Block a user