1- < < < << << HEAD
21import {
32 ChangeDetectionStrategy ,
43 Component ,
@@ -11,7 +10,6 @@ import {
1110 ViewContainerRef ,
1211} from '@angular/core' ;
1312import {
14- FormBuilder ,
1513 FormControl ,
1614 FormGroup ,
1715 FormsModule ,
@@ -30,23 +28,11 @@ import { DynamicDialogService } from '../../../shared/dynamic-dialog/dynamic-dia
3028import { ModalConfig } from '../../../shared/_models/modal-config.intreface' ;
3129import { AddImageComponent } from './add-image/add-image.component' ;
3230import { AddImageForm } from './add-image/add-image-controls.interface' ;
33- << << << < HEAD
34- = === ===
35- import { ChangeDetectionStrategy , Component , inject } from '@angular/core' ;
36- import { FormBuilder , FormGroup , ReactiveFormsModule , Validators } from '@angular/forms' ;
37- import { ApiService } from '../../_services/api.service' ;
38- import { Firestore , FirestoreModule } from '@angular/fire/firestore' ;
39- import { HttpClient } from '@angular/common/http' ;
40- import { AsyncPipe } from '@angular/common' ;
41- >>> >>> > ab739b9 ( nothing special )
42- = === ===
4331import { Post } from '../../../types/supabase' ;
44- >>> >>> > fca8c97 ( ngrx signal store fixes )
4532
4633@Component ( {
4734 selector : 'blog-add-post' ,
4835 standalone : true ,
49- < << << << HEAD
5036 imports : [
5137 ReactiveFormsModule ,
5238 FormsModule ,
@@ -55,12 +41,8 @@ import { Post } from '../../../types/supabase';
5541 RouterModule ,
5642 ] ,
5743 providers : [ AdminApiService , NgModel ] ,
58- = === ===
59- imports : [ ReactiveFormsModule , FirestoreModule , AsyncPipe ] ,
60- providers : [ ApiService , HttpClient ] ,
61- > >>> >>> ab739b9 ( nothing special )
6244 templateUrl : './add-post.component.html' ,
63- styleUrl : './add-post.component.scss' ,
45+ styleUrls : [ './add-post.component.scss' ] ,
6446 schemas : [ CUSTOM_ELEMENTS_SCHEMA ] ,
6547 changeDetection : ChangeDetectionStrategy . OnPush ,
6648} )
@@ -88,28 +70,9 @@ export class AddPostComponent implements OnInit {
8870
8971 private apiService = inject ( AdminApiService ) ;
9072
91- < << << << HEAD
92- constructor ( ) {
93- this . blogForm = this . fb . group ( {
94- title : [ '' , [ Validators . required ] ] ,
95- content : [ '' , [ Validators . required ] ] ,
96- < << << << HEAD
97- < < << << < HEAD
98- date : new Timestamp ( 0 , 0 ) ,
99- === = ===
100- date : null ,
101- > >>> >>> 34e7 e50 ( supabase added , firebase removed )
102- description : [ null ] ,
103- isDraft : [ false ] ,
104- } ) as FormGroup < PostForm > ;
105- === === =
106- } ) ;
107- >>> >>> > ab739b9 ( nothing special )
108- = === ===
10973 ngOnInit ( ) : void {
11074 this . loadPostIfIdExists ( ) ;
11175 this . initializeQuill ( ) ;
112- >>> >>> > cbcd61c ( fix lame code )
11376 }
11477
11578 private loadPostIfIdExists ( ) : void {
@@ -231,12 +194,11 @@ export class AddPostComponent implements OnInit {
231194 index : number ,
232195 stringToInsert : string ,
233196 ) : string {
234- const result = [
197+ return [
235198 ...originalString . slice ( 0 , index ) ,
236199 ...stringToInsert ,
237200 ...originalString . slice ( index ) ,
238201 ] . join ( '' ) ;
239- return result ;
240202 }
241203
242204 @HostListener ( 'window:beforeunload' , [ '$event' ] )
0 commit comments